check_PROGRAMS = test_GridSpace test_DxFile test_ToroidalPore test_EllipsePore
AM_CPPFLAGS = -I${top_srcdir}/src/include
test_GridSpace_SOURCES = GridSpace_test.cpp
test_GridSpace_LDADD = ${top_srcdir}/src/essential/libmbuild.a
test_DxFile_SOURCES = DxFile_test.cpp
test_DxFile_LDADD = ${top_srcdir}/src/essential/libmbuild.a
test_ToroidalPore_SOURCES = ToroidalPore_test.cpp
test_ToroidalPore_LDADD = ${top_srcdir}/src/essential/libmbuild.a
test_EllipsePore_SOURCES = EllipsePore_test.cpp
test_EllipsePore_LDADD = ${top_srcdir}/src/essential/libmbuild.a
check : check-am
	@echo "Unpacking testcases ...."
	@echo "================================================="
	@[ -f test.tar.gz ] && { \
	   tar -zxvf test.tar.gz | tee .testcases ;\
	} || { echo "Current Directory do no contain test files. Please obtain a developer version."; exit 1;}
	@echo "Testing GridSpace...."
	@./test_GridSpace
	@echo "Testing DxFile...."
	@echo "================================================"
	@echo "Finished running the tests, please check if the dielx_Xm.dx ... is correctly generated."
	@echo "These files can be visualized using VMD"
clean : clean-am
	rm -f *.dx
	rm -f *.dat
	@cat .testcases | while read f;do echo "rm -f $$f";rm -f $$f;done
